﻿@using System.Text
@using OA.Model
@using OA.AspNetCore.Html
@using OA.Core.Model

@model OA.Model.ApprovalTree
@{

    Layout = null;
    string msg = ViewBag.Msg;
    string tips = string.Empty;
    if (!string.IsNullOrWhiteSpace(msg))
    {
        tips = $"layer.msg('{msg}');";
    }
    List<ListItem> listCustomForm = ViewBag.CustomForm;
}
<div class="fly-panel fly-panel-user" pad20="">
    <div class="layui-tab layui-tab-brief" lay-filter="user">
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding:10px 40px 10px 0;">
            @using (Html.BeginForm(FormMethod.Post, htmlAttributes: new { @class = "layui-form", id = "myForm" }))
            {
                @Html.AntiForgeryToken()

                <div class="layui-form-item">
                    @Html.LabelFor(model => model.Name, new { @class = "layui-form-label" })
                    <div class="layui-input-block">
                        @Html.HiddenFor(model => model.ID)
                        @Html.MyEditorFor(model => model.Name)
                    </div>
                </div>

                <div class="layui-form-item">
                    @Html.LabelFor(model => model.CustomFormID, new { @class = "layui-form-label" })
                    <div class="layui-input-block">
                        @Html.MyEditorFor(model => model.CustomFormID, listCustomForm)
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block" style="text-align:right;">
                        <button class="layui-btn" lay-submit="">立即提交</button>
                    </div>
                </div>
            }
        </div>
    </div>
</div>
<script type="text/javascript">
    layui.use(['form', 'layedit', 'element','layer'], function () {
		form = layui.form;
        layer = layui.layer;
        element = layui.element;
        @Html.Raw(tips)
    });

</script>
